<template>
	<view>
		<fui-search-bar placeholder="账号/手机号" @search="handleSearch"></fui-search-bar>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userList: []
			}
		},
		methods: {
			handleSearch(e) {
				if (e.detail.value) {
					uni.$cloud.get("/account/search", {
						keyword: e.detail.value
					}).then(data => {
						this.userList = data;
					}).catch(error => {
						console.log("获得好友失败", error)
					})
				}
			}
		}
	}
</script>

<style>

</style>